<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>请客吃饭</title>
    <script>
        function decideFood() {
            var money = parseFloat(document.getElementById("money").value);
        
            var foodChoice;
            if (money >= 2000) {
                foodChoice = "大家吃西餐";
            } else if (money >= 1500) {
                foodChoice = "大家吃快餐";
            } else if (money >= 1000) {
                foodChoice = "大家喝饮料";
            } else if (money >= 500) {
                foodChoice = "大家吃棒棒糖";
            } else {
                foodChoice = "班长下次把钱带够";
            }
        
            alert("请" + foodChoice);
        }
        </script>
        </head>
        <body>
        <label for="money">请输入钱包中的金额：</label>
        <input type="text" id="money">
        <button onclick="decideFood()">确定</button>
        </body>
        </html>